<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title></title>
    <link rel="icon" type="text/css" href="icon.ico"/>
    <link rel="stylesheet" type="text/css" href="/shop/Public/Home/css/index.css" />
    <script src="/shop/Public/Home/js/jquery-1.10.1.min.js" type="text/javascript" charset="utf-8"></script>

    <script src="/shop/Public/Home/js/list.js" type="text/javascript" charset="utf-8"></script>
    <!--<script src="/shop/node_modules/hdjs/app/util.js"></script>-->
    <!--<script src="/shop/node_modules/hdjs/require.js"></script>-->
    <!--<script src="/shop/node_modules/hdjs/config.js"></script>-->
    <script src="/shop/Public/Home/js/layer.js"></script>

</head>

<body>
<!--头部开始-->
<div id="top">
    <!--头部灰条就开始-->
    <div class="topbox">
        <div class="main">
            <div class="topleft fl">
                <a href="javascript:;">欢迎来到<?php echo V("sp_system.0")['svalue'];?></a>
                <a href="#">设为首页</a>
                <a href="#">收藏本站</a>
                <!--<a href="#">帮助中心</a>-->
                <!--<a href="#" class='last'><i></i>手机商城</a>-->
            </div>
            <div class="topright fr">
                <div class="login fl">
                    <?php if(isset($_SESSION['uid'])): ?><span>欢迎您回来 <?php echo $_SESSION['uname']?><a href="<?php echo U('home/userinfo/info');?>">去个人中心</a></span>
                        <span><a href="<?php echo U('home/lg/exitlogin');?>">退出</a></span>
                        <?php else: ?>
                        <a href="<?php echo U('Home/Lg/login');?>">登录</a>
                        <a href="<?php echo U('Home/Lg/regest');?>">注册</a><?php endif; ?>
                </div>
                <span class="fl">|</span>

                <div class="fcode fl">

                    <a href="<?php echo U('home/userinfo/order');?>">我的订单</a>
                </div>
            </div>
        </div>
    </div>
    <!--头部灰条结束-->

    <!--logo区域开始-->
    <div class="logoRegion">
        <div class="main">
            <div class="logo">
                <a href="/shop/dami.html"><img width="185px" height="70px" src="<?php echo V('sp_system.3')['svalue'];?>"/></a>
            </div>
            <div class="seachRegion">
                <div class="seach fl">
                    <form action="<?php echo U('home/search/searchs');?>" method="post">
                        <input type="text" name="gname" class="seachtxt fl" value="O2+车载空气净化"/>
                        <input type="submit" class="btn" value=""/>
                    </form>
                    <p class="searchkey">
                        <?php if(is_array($hot)): $i = 0; $__LIST__ = $hot;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><a href="<?php echo U('home/goodinfo/index',['gid'=>$vo['gid']]);?>" style="display: inline-block;width: 160px;height:20px;overflow: hidden"><?php echo ($vo['gname']); ?></a><?php endforeach; endif; else: echo "" ;endif; ?>
                    </p>
                </div>

                <?php if((CONTROLLER_NAME != 'Order') AND (CONTROLLER_NAME != 'Car')): ?><div class="topshopcart fr">
                        <a href="<?php echo U('home/car/lists');?>" class="header-cart"><i></i>我的购物车<span class="cart-size">(<?php echo ($cars); ?>)</span></a>
                        <div class="cart-tips" style="width: 250px;padding-bottom: 10px">
                            <?php if(isset($_SESSION['uid'])): ?><ul id="car_ul" style="background: #fff;width: 250px;padding: 0px;margin: 0px;padding-bottom: 10px">
                                </ul>
                                <?php else: ?>
                                请
                                <a href="<?php echo U('home/lg/login');?>">登录</a>后查看您的购物车。<?php endif; ?>
                        </div>
                    </div><?php endif; ?>


            </div>
            <script>
                //                购物车AJAX异步
                $('.header-cart').mouseenter(function(){
                    uid="<?php echo session('uid');?>";
                    if(uid){
                        var str='';
                        var count=0;
                        $.post("<?php echo U('home/car/finAjxgood');?>",{uid:uid}, function (res) {
                            if($.isEmptyObject(res)){
//                            alert(444);
                                $('#car_ul').html('购物车中没有一件商品，快去购物吧');return false;
                            }else {
                                console.log(res);
                                $.each(res, function (k, v) {
                                    count = count + parseInt(v.count);
                                    str += '<li style="width: 250px;padding: 0px;margin: 0px;height:50px;line-height:20px;text-align: left;border-bottom: 2px dashed orangered;padding-bottom: 15px;margin-top: 8px">';
                                    str += '<a href="" style="display:block;width: 50px;height:60px;float: left;margin-left: 5px;">';
                                    str += '<img width="50px" height="50px" src="' + v.thumb + '" alt=""></a>';
                                    str += '<a href="" style="display: block;width: 80px;height: 60px;float:left;overflow: hidden;margin-left: 15px">' + v.gname + '</a>';
                                    str += '<a style="display: block;width:90px;height: 60px;float:left;overflow: hidden;margin-left: 5px">￥' + v.priced + ' X ' + v.count + '<br/><br/><span ugid="'+v.ugid+'" class="delgood" style="padding: 4px 4px;background: orange;cursor: pointer">删除</span></a></li>';
                                })
//                        alert(str);
                                str += '<li style="line-height: 20px;padding-top: 10px;;margin: 0px"> <a href="/shop/home/car/lists" style="background: orangered;color:#fff;line-height: 20px;padding: 5px;margin: 0px">去结算</a> </li>';
                                $('.cart-size').html('(' + count + ')');
                                $('#car_ul').html(str);
                            }
                        });
                    }

                })
                //购物车删除按钮删除购物车中的物品
                $('#car_ul').on('click','.delgood',function(){
                    var ugid=$(this).attr('ugid');
                    that=$(this);
                    //异步后台删除
                    $.post("<?php echo U('home/car/ajaxdelgood');?>",{ugid:ugid},function(res){
                        if(res.valid){
                            location.reload();
                        }
                    },'json');
                });

            </script>
        </div>
    </div>
    <!--logo区域结束-->
    <div class="clear"></div>
    <!--导航开始-->
    <div class="navbox">
        <div class="main">
            <h5 class="fl"><a href="<?php echo U('Home/index/index');?>"><i></i>全部智能酷品</a></h5>
            <ul class="menu fl">
                <?php if(is_array($nature)): foreach($nature as $key=>$vo): ?><li class="menulist">
                    <a href=""><?php echo ($vo['nname']); ?></a>
                    <div class="menuHiden">
                        <ul class="product">
                            <?php if(is_array($vo['goods'])): foreach($vo['goods'] as $key=>$voo): ?><li>
                                <a href="<?php echo U('home/goodinfo/index',['gid'=>$voo['gid']]);?>"><img width="150px" height="157px" src="<?php echo ($voo['thumb']); ?>" alt="" /></a>
                            </li><?php endforeach; endif; ?>
                        </ul>
                    </div>
                </li><?php endforeach; endif; ?>

            </ul>

        </div>

    </div>
    <!--导航结束-->
    <div class="clear"></div>

</div>
<!--头部结束-->
<!--中间开始-->

<div id="content">

    <div class="cont" style="padding-bottom:50px">
        <div class="main">
            <div class="content-left">
                <div class="box">
                    <div class="zhezhao"></div>
                    <div class="sekuai"></div>
                    <div class="smallTu"></div>
                    <a href="javascript:;" class="shang">&lt;</a>

                    <div class="list1">
                        <ul>
                            <?php if(is_array($good['pic'])): foreach($good['pic'] as $key=>$vo): ?><li><img width="400px" height="400px" src="<?php echo ($vo); ?>" alt=""></li><?php endforeach; endif; ?>
                        </ul>
                    </div>
                    <a href="javascript:;" class="xia">&gt;</a>

                    <div class="bgTu"></div>
                    <div class="bgTuHide">
                        <ul>
                            <?php if(is_array($good['pic'])): foreach($good['pic'] as $key=>$vo): ?><li><img width="800px" height="800px" src="<?php echo ($vo); ?>" alt=""></li><?php endforeach; endif; ?>
                        </ul>

                    </div>
                </div>
            </div>
            <style>
                .cont .content-right .nobdr h6 a.less{
                  background: #ccc;
                }
            </style>
            <div class="content-right">

                <div class="tit"><?php echo ($good['gname']); ?></div>
                <div class="description"><?php echo ($good['digest']); ?></div>
                <div class="pirve">￥ <?php echo ($good['priced']); ?></div>
                <?php if(is_array($arr1)): foreach($arr1 as $k=>$vo): ?><div class="category">
                        <h4><?php echo ($k); ?></h4>
                        <ul>
                            <?php if(is_array($vo)): foreach($vo as $key=>$voo): ?><li><?php echo ($voo); ?></li><?php endforeach; endif; ?>
                        </ul>
                    </div><?php endforeach; endif; ?>
                <input type="hidden" id="pcid">
                <script>
                    $(function () {
                        var style = [];
                        var obj={};
                        //选择商品组合
                        $(".category ul li").click(function () {
//							style += $(".zhong").html();
                            if ($(".zhong").length == $('.category ul').length) {
                                //获取属性的组合
                                for (var i = 0; i < $(".zhong").length; i++) {
                                    var aa=$(".category  h4").eq(i).html();
                                    style[aa] = $(".zhong").eq(i).html();
                                }
                                //将数组转化为json对象
                                for(i in style){
                                   obj[i]=style[i];
                                }
//                                alert(obj);
                                var gid =<?php echo $_GET['gid'] ?>;
                                $.post("<?php echo U('home/goodinfo/getAjaxpro');?>", {gid: gid,style:obj}, function (res) {
                                   if(res.valid){
                                       good_con=res.stock;
                                       $("#count").html('有货：'+res.stock+'件');
                                       $('.cont .content-right .nobdr h6 a').removeClass('less');
                                       $("#pcid").val(res.valid);
                                   }else{
                                       $('.cont .content-right .nobdr h6 a').addClass('less');
                                       $("#count").html('无货');
                                   }
                                }, 'json');
                            }
                        })


                        //点击立即购买时，
                        $('.cont .content-right .nobdr h6 a').click(function(){
                            //没有选完属性时不能提交
                           if($(".zhong").length!=$('.category ul').length){
                               layer.msg('请选择商品属性', function(){
                               });
                               return false;
                           }
                            //当该商品没货时
                           if( $('.cont .content-right .nobdr h6 a').attr('class')=='less'){
                               alert(2);
                               return false;
                           }
                            //检测该用户有没有登录
                            var uid="<?php echo $_SESSION['uid'] ?>";
                            if(!uid){
                                layer.msg('您还没有登录，清先登录', {
                                    time: 0 //不自动关闭
                                    ,btn: ['去登录', '再逛逛']
                                    ,yes: function(index){
                                        location.href="/shop/index.php/Home/lg/login";return false;
                                    }
                                });
                                return false;
                            }
                            //加入购物车，并且跳到购物车列表
                           var gid="<?php echo ($good['gid']); ?>";
                            var pcid=$('#pcid').val();
                            var count=parseInt($("#cou").val());
                            location.href="/shop/Home/car/addcar/gid/"+gid+'/pcid/'+pcid+'/count/'+count;
                        })



                         //点击+时
                        $('.num_r').click(function(){
                            if ($(".zhong").length == $('.category ul').length) {
                                 if(parseInt(good_con)<=parseInt($("#cou").val())){
//                                alert(3444);
                                     $("#cou").val(good_con);
                                 }
                            }else{
//                                alert(2222);
                                $("#cou").val(1);
                            }
                        });
                    })
                </script>
                <div class="num">
                    <h5>数量</h5>
                    <a href="javascript:;" class="num_l">-</a>
                    <input id="cou" type="text" value="1"/>
                    <a href="javascript:;" class="num_r">+</a>
                    <span id="count" style="padding: 10px 10px"></span>
                </div>
                <div class="nobdr">
                    <h6><a href="javascript:;">立即购买</a></h6>
                </div>
                <div class="houdun">
                    <h3>保障</h3>

                    <p><i class="o1"></i>大米商城发货&售后</p>

                    <p><i class="o2"></i>满99元包邮</p>

                    <p><i class="o3"></i>7天无理由退货</p>

                    <p><i class="o4"></i>15天免费换货</p>
                </div>
            </div>
        </div>
    </div>
    <div class="desc" id="xijie">
        <div class="desctab">
            <div class="main">
                <ul>
                    <li><a href="#xijie">产品详情</a><span>|</span></li>
                    <li><a href="#guige">规格参数</a><span>|</span></li>
                    <li><a href="#wenti">常见问题</a></li>
                </ul>
            </div>
        </div>

        <div class="con">
           <?php echo ($good['content']); ?>
        </div>
        <div class="con main" id="guige">
            <h1>产品参数</h1>
            <table cellpadding="0" cellspacing="0" border="1">
                <tbody>
                <tr>
                    <td class="wd207" colspan="2">主体</td>
                </tr>
                <tr>
                    <td class="wd207">品牌</td>
                    <td>360手机</td>
                </tr>
                <tr>
                    <td class="wd207">型号</td>
                    <td>1509-A00（Q5 Plus)</td>
                </tr>
                <tr>
                    <td class="wd207">上市时间</td>
                    <td>2016年8月</td>
                </tr>
                <tr>
                    <td class="wd207" colspan="2">基本信息</td>
                </tr>
                <tr>
                    <td class="wd207">机身颜色</td>
                    <td>流光金</td>
                </tr>
                <tr>
                    <td class="wd207">机身尺寸（mm）</td>
                    <td>156.5*80*8.3</td>
                </tr>
                <tr>
                    <td class="wd207">机身重量（g）</td>
                    <td>175.0g</td>
                </tr>
                <tr>
                    <td class="wd207" colspan="2">操作系统</td>
                </tr>
                <tr>
                    <td class="wd207">操作系统</td>
                    <td>360 OS Android 6.0</td>
                </tr>
                <tr>
                    <td class="wd207" colspan="2">主芯片</td>
                </tr>
                <tr>
                    <td class="wd207">CPU型号</td>
                    <td>骁龙820</td>
                </tr>
                <tr>
                    <td class="wd207">CPU频率</td>
                    <td>Kryo 2.15GHz x 4</td>
                </tr>
                <tr>
                    <td class="wd207" colspan="2">网络支持</td>
                </tr>
                <tr>
                    <td class="wd207">双卡机类型</td>
                    <td>双卡双待单通</td>
                </tr>
                <tr>
                    <td class="wd207">SIM卡类型</td>
                    <td>Nano SIM</td>
                </tr>
                <tr>
                    <td class="wd207">网络制式</td>
                    <td>全网通</td>
                </tr>
                <tr>
                    <td class="wd207" colspan="2">存储</td>
                </tr>
                <tr>
                    <td class="wd207">ROM</td>
                    <td>128GB UFS2.0 机身存储</td>
                </tr>
                <tr>
                    <td class="wd207">RAM</td>
                    <td>4GB LPDDR4 双通道内存</td>
                </tr>
                <tr>
                    <td class="wd207">存储卡</td>
                    <td>支持MicroSD（TF）</td>
                </tr>
                <tr>
                    <td class="wd207" colspan="2">屏幕</td>
                </tr>
                <tr>
                    <td class="wd207">主屏幕尺寸（英寸）</td>
                    <td>6.0英寸</td>
                </tr>
                <tr>
                    <td class="wd207">分辨率</td>
                    <td>1920*1080(FHD)</td>
                </tr>
                <tr>
                    <td class="wd207">屏幕材质类型</td>
                    <td>三星（SAMSUNG）Super AMOLED</td>
                </tr>
                <tr>
                    <td class="wd207">屏幕色彩</td>
                    <td>1600万</td>
                </tr>
                <tr>
                    <td class="wd207" colspan="2">前置摄像头</td>
                </tr>
                <tr>
                    <td class="wd207">前置摄像头</td>
                    <td>1300万像素</td>
                </tr>
                <tr>
                    <td class="wd207">前摄光圈大小</td>
                    <td>f/2.0</td>
                </tr>
                <tr>
                    <td class="wd207">美颜技术</td>
                    <td>支持</td>
                </tr>
                <tr>
                    <td class="wd207">拍照特点</td>
                    <td>美颜</td>
                </tr>
                <tr>
                    <td class="wd207" colspan="2">后置摄像头</td>
                </tr>
                <tr>
                    <td class="wd207">后置摄像头</td>
                    <td>双1300万像素</td>
                </tr>
                <tr>
                    <td class="wd207">摄像头光圈大小</td>
                    <td>f/2.0</td>
                </tr>
                <tr>
                    <td class="wd207">闪光灯</td>
                    <td>LED灯</td>
                </tr>
                <tr>
                    <td class="wd207">美颜技术</td>
                    <td>支持</td>
                </tr>
                <tr>
                    <td class="wd207" colspan="2">电池信息</td>
                </tr>
                <tr>
                    <td class="wd207">电池容量（mAh）</td>
                    <td>3700</td>
                </tr>
                <tr>
                    <td class="wd207">电池是否可拆卸</td>
                    <td>否</td>
                </tr>
                <tr>
                    <td class="wd207">闪充</td>
                    <td>支持QC3.0涡轮闪充</td>
                </tr>
                <tr>
                    <td class="wd207" colspan="2">娱乐功能</td>
                </tr>
                <tr>
                    <td class="wd207">mic数量</td>
                    <td>2个</td>
                </tr>
                <tr>
                    <td class="wd207">喇叭数量</td>
                    <td>1个</td>
                </tr>
                <tr>
                    <td class="wd207" colspan="2">数据接口</td>
                </tr>
                <tr>
                    <td class="wd207">数据传输接口</td>
                    <td>WIFI、蓝牙、WiFi热点、OTG接口</td>
                </tr>
                <tr>
                    <td class="wd207">NFC/NFC模式</td>
                    <td>不支持</td>
                </tr>
                <tr>
                    <td class="wd207">耳机接口类型</td>
                    <td>3.5mm</td>
                </tr>
                <tr>
                    <td class="wd207">充电接口类型</td>
                    <td>Type-C</td>
                </tr>
                <tr>
                    <td class="wd207" colspan="2">手机特性</td>
                </tr>
                <tr>
                    <td class="wd207">指纹识别</td>
                    <td>支持</td>
                </tr>
                <tr>
                    <td class="wd207">GPS</td>
                    <td>支持</td>
                </tr>
                <tr>
                    <td class="wd207">电子罗盘</td>
                    <td>支持</td>
                </tr>
                <tr>
                    <td class="wd207">霍尔感应器</td>
                    <td>支持</td>
                </tr>
                <tr>
                    <td class="wd207">陀螺仪</td>
                    <td>支持</td>
                </tr>
                <tr>
                    <td class="wd207">其他</td>
                    <td>距离感应、呼吸灯、光线感应</td>
                </tr>
                </tbody>
            </table>
        </div>
        <div class="con main" id="wenti">
            <h2>常见问题</h2>
            <dl>
                <dt><i>1、</i><em></em>订单提交成功后还可以修改收货信息吗？</dt>
                <dd><u></u>订单付款之前，您可以进入“我的订单”，在订单详情页内修改收货信息。付款之后将不可修改收货信息。</dd>
            </dl>
            <dl>
                <dt><i>2、</i><em></em>订单提交成功后还可以修改收货信息吗？</dt>
                <dd><u></u>订单付款之前，您可以进入“我的订单”，在订单详情页内修改收货信息。付款之后将不可修改收货信息。</dd>
            </dl>
            <dl>
                <dt><i>3、</i><em></em>订单提交成功后还可以修改收货信息吗？</dt>
                <dd><u></u>订单付款之前，您可以进入“我的订单”，在订单详情页内修改收货信息。付款之后将不可修改收货信息。</dd>
            </dl>
            <dl>
                <dt><i>4、</i><em></em>订单提交成功后还可以修改收货信息吗？</dt>
                <dd><u></u>订单付款之前，您可以进入“我的订单”，在订单详情页内修改收货信息。付款之后将不可修改收货信息。</dd>
            </dl>
            <dl>
                <dt><i>5、</i><em></em>订单提交成功后还可以修改收货信息吗？</dt>
                <dd><u></u>订单付款之前，您可以进入“我的订单”，在订单详情页内修改收货信息。付款之后将不可修改收货信息。</dd>
            </dl>
            <dl>
                <dt><i>6、</i><em></em>订单提交成功后还可以修改收货信息吗？</dt>
                <dd><u></u>订单付款之前，您可以进入“我的订单”，在订单详情页内修改收货信息。付款之后将不可修改收货信息。</dd>
            </dl>
            <dl>
                <dt><i>7、</i><em></em>订单提交成功后还可以修改收货信息吗？</dt>
                <dd><u></u>订单付款之前，您可以进入“我的订单”，在订单详情页内修改收货信息。付款之后将不可修改收货信息。</dd>
            </dl>

        </div>
    </div>

</div>
<!--中间结束-->
<!--尾部开始-->
<div class="mod-footer">
    <div class="foot-bannerw">
        <div class="foot-banner clearfix">
            <div class="banner-item">
                <a href="#" target="_blank" data-monitor="home_foot_days7"><i class="icon1">7</i>7天无理由退货</a>
            </div>
            <div class="banner-item">
                <a href="#" target="_blank" data-monitor="home_foot_days15"><i class="icon2">15</i>15天免费换货</a>
            </div>
            <div class="banner-item"><i class="icon3">包</i>满99元包邮</div>
            <div class="banner-item">
                <a href="#" target="_blank" data-monitor="home_foot_moblie"><i class="icon4">服</i>手机特色服务</a>
            </div>
        </div>
    </div>

    <div class="foot-containerw">
        <div class="foot-container clearfix">
            <dl class="foot-con">
                <dt data-monitor="home_foot_freshman">联系作者</dt>
                <dd data-monitor="home_help_freshman">
                    <a target="_blank" href="javascript:;" rel="nofollow">YD</a>
                </dd>
            </dl>
            <dl class="foot-con">
                <dt data-monitor="home_foot_help">作者电话</dt>
                <dd data-monitor="home_help_help">
                    <a target="_blank" href="#">13517224196</a>
                </dd>
            </dl>
            <dl class="foot-con">
                <dt data-monitor="home_foot_guide">联系邮箱</dt>
                <dd data-monitor="home_help_guide">
                    <a target="_blank" href="#" rel="nofollow">yedong_163_hubei.com</a>
                </dd>
            </dl>
            <style>

            </style>
            <dl class="foot-con">
                <dt data-monitor="home_foot_tuiguang">友情链接</dt>

                <?php if(is_array($links)): foreach($links as $key=>$vo): ?><dd data-monitor="home_help_try">
                        <a target="_blank" href="<?php echo ($vo['lurl']); ?>" rel="nofollow"><?php echo ($vo['lname']); ?></a>
                    </dd><?php endforeach; endif; ?>

            </dl>
            <dl class="foot-con">
                <dt data-monitor="home_foot_try">关注大米商城</dt>
                <dd data-monitor="home_help_try">
                    <a target="_blank" href="#" rel="nofollow">360商城大事记</a>
                </dd>
            </dl>

        </div>
    </div>
    <div class="footer-copyright"><?php echo V("sp_system.0")['svalue'];?> <?php echo V('sp_system.2')['svalue'];?>
        <?php echo V('sp_system.1')['svalue'];?>
    </div>
</div>
<!--尾部结束-->

<!--右边底部返回顶部-->
<div class="slidebar" id="slidebar">
    <ul>
        <li class="topback">
            <a href="javascript:;"></a>
        </li>
    </ul>
</div>
<!--右边底部返回顶部结束-->

</body>

</html>